package com.xiaohong.order.feign;
import com.xiaohong.order.pojo.Order;
import entity.Result;
import io.swagger.v3.oas.annotations.Operation;
import io.swagger.v3.oas.annotations.Parameter;
import io.swagger.v3.oas.annotations.enums.ParameterIn;
import org.springframework.cloud.openfeign.FeignClient;
import org.springframework.web.bind.annotation.*;

@FeignClient(name="order-service",contextId = "order")
@RequestMapping("/order")
public interface OrderFeign {
    /***
     * 根据ID查询Order数据
     * @param id
     * @return
     */
    @GetMapping("/{id}")
    Result<Order> findById(@PathVariable String id);

    /***
     * 根据ID修改Order数据
     * @param order
     * @param id
     * @return
     */
    @PutMapping(value = "/{id}" )
    Result update(@RequestBody Order order, @PathVariable String id);
}
